﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tester.DL645.Core
{
    /// <summary>
    /// 
    /// </summary>
    public static class PasswordField
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        public static List<byte> Reverse(string password)
        {

            List<string> list = new List<string>();

            for (int i = 0; i < password.Length; i = i + 2)
            {
                list.Add(password.Substring(i, 2));
            }
            list.Reverse();

            return list.Select(item => (byte)int.Parse(item, System.Globalization.NumberStyles.HexNumber))
                  .ToList();

        }
    }
}
